hysop.backend.hardware.pci_ids module

class hysop.backend.hardware.pci_ids.PCIIds(path=None, url=None)[source]

Bases: object

Class used to parse all pci.ids entries. This file should contains up to date PCI vendors and device ids.

The default path that is looked is ‘/usr/share/hwdata/pci.ids’ See http://pciids.sourceforge.net/ to get urls.

It can be updated using the command ‘update-pciids’, or by providing a custom source file or url in constructor.

Usage:

from hysop.backend.topology import PCIIds pciids = PCIIds(filepath or url)

#PCI DEVICES pciids.vendors[vendor_id]

.devices[device_id] .subdevices[subdevice_id]

#PCI DEVICE CLASSES pciids.device_classes[class_id]

.device_subclasses[subclass_id] .programming_interfaces[interface_id]

All ids can be given as hexadecimal strings or as integers.

Loads and parse a pci.ids file. The file may be compressed in gzip or bzip2 format. url has priority over path.

find_device(vendor_id, device_id, subdevice_id=None)[source]
find_device_by_id(id)[source]
find_device_by_name(vendor_name, device_name, subdevice_name=None)[source]
find_device_class(device_class_id, device_subclass_id=None, programming_interface=None)[source]
find_device_class_by_id(id)[source]
find_vendor(vendor_id)[source]
find_vendor_by_distance_to_name(vendor_name)[source]
find_vendor_by_name(vendor_name)[source]
load_from_path(path)[source]
load_from_url(url)[source]
class hysop.backend.hardware.pci_ids.PciDevice(device, vendor)[source]

Bases: object

class hysop.backend.hardware.pci_ids.PciDeviceClass(device_class)[source]

Bases: object

class hysop.backend.hardware.pci_ids.PciDeviceSubClass(device_subclass, device_class)[source]

Bases: object

class hysop.backend.hardware.pci_ids.PciProgrammingInterface(interface, device_subclass, device_class)[source]

Bases: object

class hysop.backend.hardware.pci_ids.PciSubDevice(subdevice, device, vendor)[source]

Bases: object

class hysop.backend.hardware.pci_ids.PciVendor(vendor)[source]

Bases: object

Class initializes with the raw line from pci.ids

find_device(device_id, subdevice_id=None)[source]
find_device_by_distance_to_name(device_name)[source]
find_device_by_name(device_name, subdevice_name=None)[source]